<style>
  .batch-select-dialog .header {
    height: 50px;
    background-color: #F0F0F0;
  }
  
  .batch-select-dialog .btn-group {
    float: right;
    padding: 10px 20px;
  }
  
  .batch-select-dialog .active {}
  
  .batch-select-dialog .btn-group>button {
    margin-right: 15px;
  }
  
  .batch-select-dialog .goods-table,
  .batch-select-dialog .batch-table {
    height: 220px;
    width: 100%;
    overflow: auto;
  }
  
  .batch-select-dialog .goods-table {
    margin-bottom: 10px;
  }
  
  .batch-select-dialog .goods-table .td-img {
    width: 25px;
  }
  
  .batch-select-dialog .table .thead {
    background-color: #C1E0E6;
  }
  
  .batch-select-dialog .table .tbody {
    background-color: #EFF4F7;
  }
  
  .batch-select-dialog .table-bordered>tbody>tr>td,
  .batch-select-dialog .table-bordered>tbody>tr>th,
  .batch-select-dialog .table-bordered>tfoot>tr>td,
  .batch-select-dialog .table-bordered>tfoot>tr>th,
  .batch-select-dialog .table-bordered>thead>tr>td,
  .batch-select-dialog .table-bordered>thead>tr>th {
    border: 1px solid #FFFFFF;
  }
</style>
<div ms-controller="batchDialog" class="batch-select-dialog">
  <div class="header">
    <div class="btn-group">
      <button class="btn btn-primary" ms-click="@handleSureBtn">确定</button>
      <button class="btn btn-default" ms-click="@hideDialog">取消</button>
    </div>
  </div>
  <div class="goods-table">
    <table class="table  table-bordered table-condensed">
      <thead class="thead">
        <tr>
          <th></th>
          <th>物品ID</th>
          <th>物品代码</th>
          <th>物品名称</th>
          <th>数量</th>
        </tr>
      </thead>
      <tbody class="tbody">
        <tr ms-for="($index,el) in @chooseGoods" ms-click="@handleClick($index)" ms-class="@clickIndex===$index?'actived':''">
          <td class="td-img"><img ms-visible="el.hasErrorForBatch" src="img/index/error.png" alt="" title="选择的数量必须与申请的数量相等"></td>
          <td ms-text="el.GoodsCode"></td>
          <td ms-text="el.GoodsID"></td>
          <td ms-text="el.GoodsName"></td>
          <td ms-text="el.ApplyNum"></td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="batch-table">
    <table class="table  table-bordered table-condensed">
      <thead class="thead">
        <tr>
          <th>批次流水号</th>
          <th>最新单价</th>
          <th>卡片号</th>
          <th>库存数量</th>
          <th>选择数量</th>
          <th>选择卡片号</th>
          <th>收货单备注</th>
        </tr>
      </thead>
      <tbody class="tbody">
        <tr ms-for="($index,el) in @batchList">
          <td ms-text="el.BatchSN"></td>
          <td ms-text="el.CurrentPrice"></td>
          <td><input ms-duplex="el.cardsNumber" type="text" ms-attr="{title:el.cardsNumber}" readonly></td>
          <td ms-text="el.Counts">3</td>
          <td ms-attr="{data_index:$index}">
            <input ms-duplex-number="el.SelectedCount" ms-blur="@handleApplyCountInput($event)" type="number" style="width: 90px">
          </td>
          <td ms-attr="{data_index:$index}">
            <input ms-duplex="el.SelectedCardNumberList" ms-blur="@handleCradsInput($event)" type="text">
          </td>
          <td ms-text="el.DetailRemark.length>5?el.DetailRemark.substring(0,5)+'...':el.DetailRemark" ms-attr="{title:el.DetailRemark}">xxx
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>